#ifndef INSM2_DRIVER_H
#define INSM2_DRIVER_H

#include <iostream>
#include <memory>

#include <NMEA_PARSER/nmea.h>
#include "bufferparaseinterface.h"
#include "INSM2_Define.h"

class INSM2_Driver : public BufferParaseInterface
{
public:
    INSM2_Driver();
    bool setBuffer(const std::string &buf_){
        sentence_=buf_;
        return true;
    }

    void parse();

    INS_STATUS& getInsData() {
        return nmeaService->ins_;
    }

    RTK_STATUS& getRTKData(){
        return nmeaService->gps_;
    }

    INS_STATUS& getIMUData(){
        return nmeaService->imu_;
    }

    uint8_t checksum(){}

    std::shared_ptr<nmea::GPSService> getNmeaServiceObj(){
        return nmeaService;
    }
private:
    std::string sentence_;
    nmea::NMEAParser parser;
    std::shared_ptr<nmea::GPSService> nmeaService;
};

#endif // INSM2_DRIVER_H

//echo \$GPGGA,073635.40,2948.6306,N,12133.1093,E,1,08,2.1,25.37,M,12.60,M,,*5C > /dev/pts/7
//echo \$GPGGA,205630.945,3346.1070,N,08423.6687,W,0,03,,30.8,M,-30.8,M,,0000*73 > /dev/pts/7

//checksum failed
//echo \$GPGGA,073635.40,2948.6306,N,12133.1093,W,1,08,2.1,25.37,M,12.60,M,,*5C > /dev/pts/7
